<?php

function widgets_create($name, $parent=NULL)
{
	global $FU;
	$widget = NULL;
	$script = $FU->widgets->dir.'/'.$name.'.php';
	if (is_script($script)) {
		require_once $script;
		$widget = new $name($parent);
		$widget->widget_name = $name;
	}
	return $widget;
}
